USE [AnotherSuccessfulProcedure]

IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[MatchesByLogId]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
	DROP PROCEDURE dbo.MatchesByLogId
END


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		Neil Wilson
-- Create date: 09/05/2008
-- Description:	Gets a Matches record by id
-- =============================================
CREATE PROCEDURE MatchesByLogId 

	@LogId int

AS
BEGIN

	SET NOCOUNT ON;

SELECT [MatchId]
      ,[RedFinalScore]
      ,[BlueFinalScore]
      ,[MatchStartTime]
      ,[MatchEndTime]
      ,[LogId]
      ,[MapId]
FROM 
	[AnotherSuccessfulProcedure].[dbo].[Matches]
WHERE
		[LogId] = @LogId
END
GO